﻿using Common;
using LiteDB;
using System;
using System.Collections.Generic;
using System.Text;

namespace Web.Controllers
{
#pragma warning disable CS1591 
  public class Record
  {
    public string SysPrimaryKey { set; get; }
    public string Uid { set; get; }
    public string Uname { set; get; }
    public string RecordDt { set; get; }
  }
#pragma warning restore CS1591

  /// <summary>
  /// FaceCheckLog数据本地保存 作为未来提交到平台的记录有效性的验证
  /// </summary>
  public class FaceCheckLogLocal
  {
    /// <summary>
    /// 新增记录
    /// </summary>
    /// <returns></returns>
    public static bool InsertBulk(List<Record> records)
    {
      try
      {
        LiteDbHelper.InsertBulk<Record>("Record", records, "record.db");
        return true;
      }
      catch (Exception e)
      {
        return false;
      }
    }
  }
}
